<?php  
 //ini_set("display_errors",1); 
	
my_component_load('testing' , false);
my_component_load('paging' , false);   
my_component_load('data_setting', false);
my_component_load('list_kalender' , false);   
my_component_load('pr_yearly_income_komponen' );
$task = isset($_GET['task']) ? $_GET['task'] : "";  
$tanggal = isset($_GET['tanggal']) ? $_GET['tanggal'] : "";  
$value = isset($_GET['value']) ? $_GET['value'] : "";  
$id = isset( $_GET['id'] ) ? $_GET['id']:  0;
$pr_yearly_income_id= isset( $_GET['pr_yearly_income_id'] ) ? $_GET['pr_yearly_income_id']:  0;
$komponen_id = isset( $_GET['komponen_id'] ) ? $_GET['komponen_id']:  0;
$karyawan_id = isset( $_GET['karyawan_id'] ) ? $_GET['karyawan_id']:  0;

if($task == "er"){
}elseif($task == "excel"){
	$komponen_name = get_komponen($pr_yearly_income_id,$komponen_id);
		header("Content-Type: application/xls");
		header("Content-Disposition: attachment;filename=yearly_income_komponen_".str_replace(" ","_", strtolower($komponen_name)).'_'.rand().".xls");
		echo excel_report_komponen($pr_yearly_income_id, $komponen_id);
		exit;			
				
}else{

	$content = list_per_komponen($pr_yearly_income_id, $komponen_id);
}
generate_my_web($content , 'Detail komponen yearly income');